package dating.service;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import dating.model.User;

@Stateless
public class RegisterService extends GenericService<User, Long> implements RegisterServiceLocal {
	@EJB
	private UserServiceLocal userService;
	
	public RegisterService() {
		super(User.class);
	}

	public boolean register(User user){
		 if(userService.exists(user)) {
			 return false;	
		 }
		 
		 userService.save(user);
		 return true;
	}

}
